this.view = new FolderView(this._folder, id, parentView);
- Main.overview.connect('item-drag-begin',
- this._onDragBegin.bind(this));
- Main.overview.connect('item-drag-end',
- this._onDragEnd.bind(this));
+ this._itemDragBeginId = Main.overview.connect(
+ 'item-drag-begin', this._onDragBegin.bind(this));
+ this._itemDragEndId = Main.overview.connect(
+ 'item-drag-end', this._onDragEnd.bind(this));
this.actor.connect('clicked', this.open.bind(this));
this.actor.connect('destroy', this.onDestroy.bind(this));
}
onDestroy() {
+ Main.overview.disconnect(this._itemDragBeginId);
+ Main.overview.disconnect(this._itemDragEndId);
+
this.view.actor.destroy();
if (this._spaceReadySignalId) {
});
}
- Main.overview.connect('item-drag-begin', this._onDragBegin.bind(this));
- Main.overview.connect('item-drag-end', this._onDragEnd.bind(this));
+ this._itemDragBeginId = Main.overview.connect(
+ 'item-drag-begin', this._onDragBegin.bind(this));
+ this._itemDragEndId = Main.overview.connect(
+ 'item-drag-end', this._onDragEnd.bind(this));
this.actor.connect('destroy', this._onDestroy.bind(this));
}
_onDestroy() {
+ Main.overview.disconnect(this._itemDragBeginId);
+ Main.overview.disconnect(this._itemDragEndId);
+
if (this._folderPreviewId > 0) {
GLib.source_remove(this._folderPreviewId);
this._folderPreviewId = 0;